﻿@model PNProject.EF.CMenu
@{
    ViewBag.Title = "CreateContext";
    Layout = "~/Views/Shared/AdminLayout.cshtml";
}

<div class="admin_head">
Tạo mới menu - @ViewData["spn"].ToString();
</div>


<div class="admin_content">

@using (Html.BeginForm("CreateContext", "AdminPS", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
    @Html.ValidationSummary(true)
    @Html.HiddenFor(a => a.CContent)
    @Html.HiddenFor(a => a.ProductID)
    <fieldset>
        <legend>Form nhập - Danh mục sản phẩm dịch vụ</legend>
        <div class="title">
        <img src="/Images/Base/chimuc.jpg" style="margin-right:10px; margin-bottom:1px;"/>Tên menu
        </div>
        <div>
        @Html.EditorFor(a => a.Name)
        </div>


        <div class="title">
        <img src="/Images/Base/chimuc.jpg" style="margin-right:10px; margin-bottom:1px;"/>Nội dung
        </div>
        <textarea class="ckeditor" id="editor1" rows="10" style="width:540px; height:300px; overflow-x:hidden;"></textarea>
        <br />

        <p>
            <input id="main-submit" type="submit" value="Tạo mới" />
        </p>
</fieldset>
}
</div>

<script type="text/javascript">

    $(document).ready(function () {
        $("#main-submit").click(function () {
            var value1 = CKEDITOR.instances['editor1'].getData();
            $("#CContent").val(value1);
        });
    });
</script>